package cn.tedu.community.commons.pojo.health.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class HealthDTO implements Serializable {
    /**
     * 温度
     */
    @Pattern(regexp = "((^3[5-9])(\\.\\d{1})?$|^(4[0-5])(\\.\\d{1})?$)",
            message = "请输入35-45之间的摄氏度！")
    private String temperature;

    /**
     * 健康码
     */
    @NotBlank(message = "请上传健康码截图！")
    private String healthQrcode;

    /**
     * 是否咳嗽
     */
    @Pattern(regexp = "^[01]$",
            message = "请选择是否咳嗽！")
    private String cough;

    /**
     * 是否头疼
     */
    @Pattern(regexp = "^[01]$",
            message = "请选择是否头疼！")
    private String headache;

    /**
     * 是否疲劳
     */
    @Pattern(regexp = "^[01]$",
            message = "请选择是否疲劳！")
    private String fatigue;

    /**
     * 是否就医
     */
    @Pattern(regexp = "^[01]$",
            message = "请选择是否就医！")
    private String treatment;

    /**
     * 其他状况
     */
    @Pattern(regexp = ".{1,40}",
            message = "请输入1-40个字符的其他身体状况！没有则填写'无'")
    private String otherConditions;
}
